<template>
  <div class="page-search">
    <binQueryForm :formConfig="formConfig">
      <template #btnFunction>
        <el-button type="primary" :icon="EditPen" @click="handleNewClick" plain>新增</el-button>
      </template>
    </binQueryForm>
  </div>
</template>

<script setup>
import { EditPen } from '@element-plus/icons-vue'
import binQueryForm from '@/base-ui/queryForm'
import { defineProps } from 'vue'

const props = defineProps({
  formConfig: {
    type: Object,
    default: {}
  }
})

const emit = defineEmits(['handleNewClick'])

// 点击添加，发出事件给父组件
const handleNewClick = () => {
  emit('handleNewClick')
}
</script>

<style lang="less" scoped></style>
